package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.TeacherMapper;
import com.jobpass.common.model.Teacher;
import com.jobpass.common.service.TeacherService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements TeacherService {
    @Resource
    private TeacherMapper teacherMapper;
    @Override
    public List<Teacher> FindAllTeacher() {
        return teacherMapper.selectList(null);
    }

    @Override
    public Teacher FindTeacherById(Long id) {
        return teacherMapper.selectById(id);
    }

    @Override
    public int DeleteTeacherById(Long id) {
        return teacherMapper.deleteById(id);
    }

    @Override
    public int UpdateTeacherById(Teacher teacher) {
        return teacherMapper.updateById(teacher);
    }

    @Override
    public int SavaTeacher(Teacher teacher) {
        return teacherMapper.insert(teacher);
    }
}
